@import 'vars.less';
@import 'animate.less';
@import 'vant.less';

page {
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Arial, Roboto, PingFang SC, Hiragino Sans GB, Microsoft Yahei, sans-serif
}

cover-image,
cover-view,
movable-area,
movable-view,
scroll-view,
view {
  transition: width 2s;
  -moz-transition: width 2s;
  -webkit-transition: width 2s;
  -o-transition: width 2s;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
  color: transparent;
}

scroll-view ::-webkit-scrollbar {
  width: 0;
  height: 0;
  color: transparent;
  display: none;
}

._small {
  display: inline;
  font-size: 65%;
  font-weight: normal;
}

.container {
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;

  &-light {
    background: #fafafa;
  }
}

.flex {
  &-column {
    display: flex;
    flex-direction: column;
  }

  &-row {
    display: flex;
    flex-direction: row;
  }
}

.p2-5 {
  padding: 10px 15px;
}

.linear-blue {
  background: rgb(103, 153, 255) !important;
  background: -moz-linear-gradient(top, rgba(103, 153, 255, 1) 0%, rgba(137, 176, 255, 1) 100%) !important;
  background: -webkit-linear-gradient(top, rgba(103, 153, 255, 1) 0%, rgba(137, 176, 255, 1) 100%) !important;
  background: linear-gradient(to bottom, rgba(103, 153, 255, 1) 0%, rgba(137, 176, 255, 1) 100%) !important;
}

.flex-none {
  flex: none !important;
}

.text {
  &-info {
    color: @info;
  }

  &-primary {
    color: @primary;
  }

  &-danger {
    color: @danger;
  }

  &-warning {
    color: @warning;
  }

  &-gray {
    color: @gray;
  }
}


.button-hover {
  opacity: .85
}

.btn-info {
  background-color: @info;
  color: #fff;
}

.border-radius {
  border-radius: 5px;

  &-top {
    border-radius: 5px 5px 0 0;
  }

  &-bottom {
    border-radius: 0 0 5px 5px;
  }
}

input:focus {
  color: blue;
  font-family: UICTFontTextStyleBody;
}

.input-placeholder {
  color: @orangred;
  font-family: UICTFontTextStyleBody;
}

.placeholder {
  color: @orangred;
}

/**
 *.page
 */
.page {
  &-warpper {
    background: #fff;
    padding: 16px;

  }

  &-title {
    margin: 0 0 15px;
    text-align: center;
    font-size: 14px;
  }

  &-content {
    font-size: 14px;
    color: #323233;

    >*:first-child {
      margin-top: 0;
    }

    p {
      text-indent: 1em;
      font-weight: 300;
      line-height: 1.5;
      margin-bottom: 10px;
    }

    h4 {
      margin: 15px 0;
      font-size: 16px;
    }
  }

  &-block {
    font-size: 12px;
    margin: 0;
    color: rgba(69, 90, 100, .6);
    padding: 20px 15px 15px;
    font-weight: 300;
    line-height: 18px;
    position: relative;
  }
}

/**
 *.page-nav
 */
.page-nav {
  width: 100vw;

  &-white {
    color: rgba(255, 255, 255, .8);
  }

  &-navbar {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 1;
    z-index: 999;
    background-color: white;
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  &-titlebar {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;

    &__title {
      flex: 1;
      font-size: 17px;
      line-height: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding-left: 15px;
      max-width: 60%;
    }
  }

  &-button {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;

    &-back {
      font-size: 21px;

      .back-image {
        width: 25rpx;
        height: 25rpx;
      }
    }

    &-home {
      .home-image {
        width: 50rpx;
        height: 50rpx;
      }
    }

    &+.page-nav-titlebar__title {
      padding-left: 0;
    }
  }
}

/**
 *.swiper-corner
 */
.swiper-corner {
  overflow: hidden;
  margin: 15px 0;
  height: 100px;

  .swiper-item {
    height: 100%;
    padding: 0 5px;

    image {
      width: 100%;
      height: 100%;
      display: block;
      border-radius: 5px;
    }

    div {
      height: 100%;
    }
  }

  .wx-swiper-dots.wx-swiper-dots-horizontal {
    bottom: 6px;
  }

  .wx-swiper-dot {
    width: 5px;
    height: 5px;
  }

  .wx-swiper-dot-active {
    width: 15px;
    border-radius: 5px;
  }
}

.swiper-books {
  height: 425px;
  margin: 0;

  .swiper-item {
    padding: 0 15px;
  }
}

/**
 * ruler
 */
.ruler {
  width: 100%;
  height: 10px;
  display: flex;
  overflow: hidden;

  &::before {
    width: 100%;
    height: 100%;
    transform: translateX(-1px);
    background-image: repeating-linear-gradient(90deg, @color-main 0, @color-main 1px, transparent 0, transparent 25px), repeating-linear-gradient(90deg, @color-main 0, @color-main 1px, transparent 0, transparent 5px);
    background-repeat: no-repeat;
    background-position: 0% 0%;
    background-size: 100% 100%, 100% 50%;
    content: '';
  }
}

/**
 * CUSTOM PAGE
 */

.autofit-cell {
  .van-cell__value {
    flex: none;
    margin-left: 15px;
  }
}

.category-cell {
  .van-cell__title {
    font-weight: 600;
  }

  .van-cell__right-icon-wrap {
    margin: 0;
  }
}

.book {
  &-workrecord {
    .van-cell__value {
      flex: 3;
      display: flex;
      text-align: left;
    }
  }
}

.note-book-empty {
  .van-grid-item__content {
    padding: 0 !important;
  }

  .van-grid-item__icon {
    height: auto !important;
  }

  .book-item {
    margin-top: 30px;
    display: flex;
    align-items: center;
    color: #969799;

    &-title {
      font-size: 14px;
    }
  }
}


.work-type-color {
  &-0 {
    color: cornflowerblue;
  }

  &-1,
  &-2 {
    color: mediumseagreen;
  }

  &--1 {
    color: @warning;
  }

  &--2 {
    color: gray;
  }
}

.stats-cell {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;

  &__item {
    padding: 10px 0;
    width: 50%;
    display: flex;
    align-items: flex-end;

    &-text {
      color: #323333;
      margin-right: 5px;

      &::after {
        content: ":";
      }
    }

    &-value {
      font-size: 14px;
    }

    &-unit {
      font-size: 10px;
    }
  }
}


.billrecord-cell {
  .van-cell__value {
    flex: 3;
  }

  &__date {
    display: flex;
    flex-direction: column;
    font-family: Arial, "Courier New", Courier, monospace;

    &-day {
      font-size: 20px;
      font-weight: bold;
    }

    &-month {
      font-size: 12px;
      color: #939999;
    }
  }
}



.square {
  position: relative;
  width: 100%;

  &-dummy {
    display: block;
    padding-top: 100%;
  }

  &-inner {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -moz-box-align: center;
    -moz-box-pack: justify;
    align-items: center;
    align-content: space-around;
    box-sizing: border-box;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;

    image {
      width: 100%;
      height: 100%;
    }
  }

  &-cover {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    transform: scale(0.12);

    &__icon {
      height: 100%;
      background: rgba(0, 0, 0, 0.2);
      position: relative;
      border-radius: 100%;

      &:after {
        content: '';
        display: block;
        padding-top: 100%;
      }

      &-inner {
        width: 100%;
        height: 100%;
        position: absolute;
        overflow: hidden;

        image {
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
